package com.video.list.player.bean

import android.os.Parcel
import android.os.Parcelable

class VideoInfo() : Parcelable{
    var position: Int? = null
    var mp4Url: String? = null
    var title: String? = null
    var desc: String? = null
    var cover: String? = null
    var msg: String? = null
    var froms: String? = null
    var isMp4: String? = null

    constructor(parcel: Parcel) : this() {
        position = parcel.readValue(Int::class.java.classLoader) as? Int
        mp4Url = parcel.readString()
        title = parcel.readString()
        desc = parcel.readString()
        cover = parcel.readString()
        msg = parcel.readString()
        froms = parcel.readString()
        isMp4 = parcel.readString()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeValue(position)
        parcel.writeString(mp4Url)
        parcel.writeString(title)
        parcel.writeString(desc)
        parcel.writeString(cover)
        parcel.writeString(msg)
        parcel.writeString(froms)
        parcel.writeString(isMp4)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<VideoInfo> {
        override fun createFromParcel(parcel: Parcel): VideoInfo {
            return VideoInfo(parcel)
        }

        override fun newArray(size: Int): Array<VideoInfo?> {
            return arrayOfNulls(size)
        }
    }


}